package com.ohc.itnanls;

public class Stack {

    private SupperArray supperArray = new SupperArray();

    public void push(int data) {
        supperArray.addToTail(data);
    }

    public int pop() {
        int i = supperArray.select(supperArray.size() - 1);
        supperArray.delete(supperArray.size() - 1);
        return i;
    }


    public boolean isEmpty() {
        return supperArray.size() == 0;
    }

    public int peek() {
        return supperArray.select(supperArray.size() - 1);
    }
}
